import request from "@/utils/request";

// 查询商品列表列表
export function listProd(query) {
  return request({
    url: "/product/prod/list",
    method: "get",
    params: query,
  });
}
// 查询商品列表列表
export function listFromEs(query) {
  return request({
    url: "/product/prod/listFromEs",
    method: "get",
    params: query,
  });
}

// 查询商品列表详细
export function getProd(prodId) {
  return request({
    url: "/product/prod/" + prodId,
    method: "get",
  });
}

// 新增商品列表
export function addProd(data) {
  return request({
    url: "/product/prod",
    method: "post",
    data: data,
  });
}

// 修改商品列表
export function updateProd(data) {
  return request({
    url: "/product/prod",
    method: "put",
    data: data,
  });
}

// 删除商品列表
export function delProd(prodId) {
  return request({
    url: "/product/prod/" + prodId,
    method: "delete",
  });
}
